<?php
echo '<br/><br/>';
echo '<h2> Diário de Classe </h2>';
echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="table">
           <tr class="table_header">
            <td valign="middle" align="left"><center>Aluno</center></td>
            <td valign="middle" align="left"><center>Nota 1</center></td>
            <td valign="middle" align="left"><center>Nota 2</center></td>
            <td valign="middle" align="left"><center>Nota 3</center></td>
            <td valign="middle" align="left"><center>Prova Final</center></td>
            <td valign="middle" align="left"><center>Faltas</center></td>
            <td valign="middle" align="left"><center>Ação</center></td>
            </tr>';
foreach ($diarios as $diario) {
    echo '<form action="/professor/resultadoNovaNota" method="post">';
    echo '<tr class="row1">
            <td valign="middle" align="left"><a><center>';
    $nome = $Users->first(array("conditions" => array("id" => $diario["users_id"])));
    echo '<input type="hidden" name="users_id" value="'.$nome["id"].'">';
    echo '<input type="hidden" name="turma_id" value="'.$diario["turma_id"].'">';
    echo '<input type="hidden" name="disciplina_id" value="'.$diario["disciplina_id"].'">';
    echo $nome["nome"].'</a></td>';
    echo '<td valign="middle" align="left"><a>';
    echo '<center><input name="nota1" type="text" class="inputgri2" value="'.$diario["nota1"].'"/></center>';
    echo '<td valign="middle" align="left"><a>';
    echo '<center><input name="nota2" type="text" class="inputgri2" value="'.$diario["nota2"].'"/></center>';
    echo '<td valign="middle" align="left"><a>';
    echo '<center><input name="nota3" type="text" class="inputgri2" value="'.$diario["nota3"].'"/></center>';
    echo '<td valign="middle" align="left"><a>';
    echo '<center><input name="nfinal" type="text" class="inputgri2" value="'.$diario["nfinal"].'"/></center>';
    echo '<td valign="middle" align="left"><a>';
    echo '<center><input name="faltas" type="text" class="inputgri2" value="'.$diario["faltas"].'"/></center>';
    echo '<td valign="middle" align="left"><a>';
    echo '<center><input type="submit" class="button" value="Salvar" /></center>';
    echo '</form>';
}
echo '</tr></table>';


?>